package com.lvs.zmwz.controller.app;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lvs.zmwz.comm.DictionaryEnum;
import com.lvs.zmwz.entity.Shop;
import com.lvs.zmwz.entity.ShopType;
import com.lvs.zmwz.service.IShopService;
import com.lvs.zmwz.service.IShopTypeService;
import com.lvs.zmwz.util.IdentityUtil;
import com.lvs.zmwz.util.QPage;
import com.lvs.zmwz.util.ResultView;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 商品分类表 前端控制器
 * </p>
 *
 * @author 
 * @since 2022-07-22
 */
@RestController
@RequestMapping("/api/front/shop-type")
public class AppShopTypeController {


    @Autowired
    private IShopTypeService iShopTypeService;

    @Autowired
    private IShopService iShopService;


    /**
     * 分类列表-不分页
     * @return
     */
    @GetMapping("/select")
    public ResultView select() {
        QueryWrapper<ShopType> queryWrapper=new QueryWrapper<>();
        queryWrapper.eq("is_del",DictionaryEnum.IS_DEL_N.getCode());
        List<ShopType> shopTypes=this.iShopTypeService.list(queryWrapper);
        return ResultView.ok(shopTypes);
    }


}
